export default function createElement(vnode){
	//创建DOM节点
	let domNode = document.createElement(vnode.sel)
	//判断是否有子节点 children是否undefined
	if(vnode.children==undefined){//没有子节点
		domNode.innerText = vnode.text
	}else if(Array.isArray(vnode.children)){//有子节点
		//递归创建节点
		for(let child of vnode.children){
			let childDom = createElement(child);
			domNode.appendChild(childDom)
		}
	}
	//添加elm属性
	vnode.elm = domNode;
	return domNode;
}